// console样式
const __getStyle = bgColor => {
    return [
        `background:${bgColor} ; height: 18px;line-height: 18px; padding: 1px; border-radius: 3px 0 0 3px;  color: #fff`,
        "background:#169fe6 ; height: 18px;line-height: 18px; padding: 1px; border-radius: 0 3px 3px 0;  color: #fff"
    ];
};

const CONSOLE_INFO = "info";
const CONSOLE_WARN = "warn";
const CONSOLE_ERROR = "error";
const CONSOLE_STYLE = {
    [CONSOLE_INFO]: __getStyle("#333"),
    [CONSOLE_WARN]: __getStyle("#f90"),
    [CONSOLE_ERROR]: __getStyle("#f00")
};
const e_log = (msg, type = 'info') => {
    console.log(`%c Output =>  %c ${msg} `, ...CONSOLE_STYLE[type]);
};

export default e_log;